# vim:set noet ts=4:
#
# ibust - IBus with Traditional interface
#
# Copyright (c) 2013 Daniel Sun
# Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com>
# Copyright (c) 2007-2010 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA  02111-1307  USA

NULL =

DEPS = $(top_builddir)/src/libibust-@IBUST_API_VERSION@.la

INCLUDES =              \
	-g                  \
	@GLIB2_CFLAGS@      \
	@GIO2_CFLAGS@       \
	-I$(top_srcdir)/src \
	-I$(top_builddir)/src \
	$(NULL)

prog_ldadd = 			\
	@GLIB2_LIBS@        \
	@GIO2_LIBS@			\
	$(top_builddir)/src/libibust-@IBUST_API_VERSION@.la	\
	$(NULL)

noinst_PROGRAMS = $(TESTS)
TESTS =               \
	ibust-bus          \
	ibust-config       \
	ibust-configservice\
	ibust-factory      \
	ibust-inputcontext \
	ibust-inputcontext-create \
	ibust-keynames     \
	ibust-serializable \
	ibust-share        \
	ibust-util         \
	$(NULL)

if ENABLE_ENGINE
TESTS += ibust-engine-switch
endif

TESTS_ENVIRONMENT = \
	top_builddir=$(top_builddir) \
	top_srcdir=$(top_srcdir) \
	builddir=$(builddir) \
	$(srcdir)/setupenv \
	$(NULL)

EXTRA_DIST = setupenv

ibust_bus_SOURCES = ibust-bus.c
ibust_bus_LDADD = $(prog_ldadd)

ibust_config_SOURCES = ibust-config.c
ibust_config_LDADD = $(prog_ldadd)

ibust_configservice_SOURCES = ibust-configservice.c
ibust_configservice_LDADD = $(prog_ldadd)

ibust_engine_switch_SOURCES = ibust-engine-switch.c
ibust_engine_switch_LDADD = $(prog_ldadd)

ibust_factory_SOURCES = ibust-factory.c
ibust_factory_LDADD = $(prog_ldadd)

ibust_inputcontext_SOURCES = ibust-inputcontext.c
ibust_inputcontext_LDADD = $(prog_ldadd)

ibust_inputcontext_create_SOURCES = ibust-inputcontext-create.c
ibust_inputcontext_create_LDADD = $(prog_ldadd)

ibust_keynames_SOURCES = ibust-keynames.c
ibust_keynames_LDADD = $(prog_ldadd)

ibust_serializable_SOURCES = ibust-serializable.c
ibust_serializable_LDADD = $(prog_ldadd)

ibust_share_SOURCES = ibust-share.c
ibust_share_CFLAGS = @DBUS_CFLAGS@
ibust_share_LDADD = $(prog_ldadd) @DBUS_LIBS@

ibust_util_SOURCES = ibust-util.c
ibust_util_LDADD = $(prog_ldadd)

-include $(top_srcdir)/git.mk
